// import AdvancedSearch from "@/gcfx_web/components/AdvancedSearch";
// import useAdvancedSearch from "@/gcfx_web/components/AdvancedSearch/useAdvancedSearch";

import { sliceUpload } from "@/common/fileUtils/sliceUpload";
import { IUseProUpload } from "@/gcfx_web/defaultConfig/config";

// 工程文件上传相关配置
const useProUpload: IUseProUpload = () => {
  /**
   * 文件上传方法
   * @param fileInfo 选择的文件
   * @return proId 工程文件id
   */
  const uploadProFile = async (fileInfo: any) => {
    const fileRes = await sliceUpload(fileInfo, "project_upload", 0, { ispro: 1 });
    // const fileId = fileRes?.tid;
    return fileRes;
  };

  return {
    uploadProFile,
  };
};

export default useProUpload;
